﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model.Core
{
    public abstract class NotifyPropertyChanged : INotifyPropertyChanged
    {
        protected NotifyPropertyChanged()
        {

        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            var propertyChanged = PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
        protected virtual void OnPropertyChanging<T>(ref T oldValue, T newValue, string propertyName)
        {

        }
    }
}
